Fix features in Repo
authorFelix Krull <f_krull@gmx.de>
Sat, 18 May 2019 11:56:58 +0000 (13:56 +0200)
committerColin Walters <walters@verbum.org>
Fri, 6 May 2022 16:53:53 +0000 (12:53 -0400)
rust-bindings/rust/src/repo.rs

index 279fe8f363ca81c27e88e2594ba24f475e27fea2..5ed83786e244498ee41b9cd594c4d8d9d32d4c09 100644 (file)
@@ -1,4 +1,6 @@
-use auto::{Repo, RepoListRefsExtFlags};
+use crate::auto::Repo;
+#[cfg(any(feature = "v2016_4", feature = "dox"))]
+use crate::auto::RepoListRefsExtFlags;
 use ffi;
 use gio;
 use glib;
@@ -48,6 +50,7 @@ pub trait RepoExtManual {
         cancellable: Q,
     ) -> Result<HashMap<String, String>, Error>;
 
+    #[cfg(any(feature = "v2016_4", feature = "dox"))]
     fn list_refs_ext<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b gio::Cancellable>>>(
         &self,
         refspec_prefix: P,
@@ -110,6 +113,7 @@ impl<O: IsA<Repo> + IsA<glib::Object> + Clone + 'static> RepoExtManual for O {
         }
     }
 
+    #[cfg(any(feature = "v2016_4", feature = "dox"))]
     fn list_refs_ext<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b gio::Cancellable>>>(
         &self,
         refspec_prefix: P,